std::shared_ptr::owner_before

From Cppreference

Jump to: navigation, search
template< class T >
bool owner_before( const shared_ptr<T>& r) const;

template< class T >
bool owner_before( const std::weak_ptr<T>& r) const;

Checks whether the managed object precedes the managed object of another shared pointer in implementation defined order. The order is such that two shared pointers compare equal only if they manage the same object.

Contents

[edit] Parameters

[edit] Return value

true if the managed object precedes the managed object of another shared pointer, false otherwise.

[edit] Example

[edit] See also